﻿using System;
using System.Configuration;
using System.ComponentModel;

namespace Uniloader.Configuration
{
    /// <summary>
    /// Represents a configuration section in the "uniloaderLibraries" group.
    /// </summary>
    public class TransferManagerSection : ConfigurationSection
    {
        /// <summary>
        /// The type which implements Uniloader.Managers.ULTaskManager.
        /// </summary>
        [ConfigurationProperty("managerType", IsRequired = true, IsKey = true)]
        [TypeConverter(typeof(TypeParser))]
        public Type ManagerType
        {
            get { return (Type)base["managerType"]; }
            set { base["managerType"] = value; }
        }

        /// <summary>
        /// The friendly name of the download manager.
        /// </summary>
        [ConfigurationProperty("displayName", IsRequired = true, IsKey = true)]
        public string DisplayName
        {
            get { return (string)base["displayName"]; }
            set { base["displayName"] = value; }
        }
    }
}
